Socket
Socket
Sign inDemoInstall

configcat-common

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configcat-common

ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.


Version published
Weekly downloads
112K
increased by1.66%
Maintainers
1
Weekly downloads
 
Created

What is configcat-common?

The configcat-common npm package is a client library for ConfigCat, a feature flag and configuration management service. It allows developers to manage feature flags and remote configurations in their applications, enabling them to toggle features on and off without deploying new code.

What are configcat-common's main functionalities?

Initialize ConfigCat Client

This feature allows you to initialize the ConfigCat client with your SDK key, which is necessary to interact with the ConfigCat service.

const { createClient } = require('configcat-common');
const client = createClient('YOUR-SDK-KEY');

Get Feature Flag Value

This feature allows you to retrieve the value of a feature flag. The method takes the feature flag key, a default value, and a callback function to handle the retrieved value.

client.getValue('isMyFeatureEnabled', false, (value) => {
  console.log('Feature flag value:', value);
});

Get Configuration Value

This feature allows you to retrieve the value of a configuration setting. Similar to feature flags, it takes the configuration key, a default value, and a callback function.

client.getValue('myConfigKey', 'defaultValue', (value) => {
  console.log('Configuration value:', value);
});

Set User Context

This feature allows you to set the user context, which can be used to serve different configurations or feature flags based on the user.

const user = { identifier: 'user123', email: 'user@example.com' };
client.setUser(user);

Other packages similar to configcat-common

Keywords

FAQs

Package last updated on 01 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc